<template>
    <div>
        <span :class="defaultTab===index?'activeTab':''" v-for="(i,index) in tab" :key="index" @click="$emit('travelTab',index)">{{i}}</span>
    </div>
</template>
<script>
export default {
    data(){
        return{
             tab:['最近预定','已完成','喜欢']
        }
    },
    props:['defaultTab','travelTab']
}
</script>
<style scoped>
.activeTab{
     color: #58bfc0;
}
</style>